package com.zhanglehua.study.net.ping;

import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;

public class TestPing {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			InetAddress address = InetAddress.getByName("192.168.0.1");
			System.out.println(address.isReachable(5000));
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
